Particle
Generate particle effect.
Node Data | |
|---|---|
Display name | |
Particle | |
Internal name | |
Node_Particle | |
Inheritances | |
| Node_Particle | |
Inputs | |
Output | |
vec2 |
Dimension |
surface |
Background |
Sprite | |
surface |
Particle Sprite |
enum |
Surface Array |
range |
Animation Speed |
bool |
Stretch Animation |
enum |
On Animation End |
Spawn | |
bool |
Spawn |
enum |
Spawn Type |
trigger |
Spawn |
int |
Spawn Delay |
int |
Burst Duration |
range |
Spawn Amount |
Lifespan | |
range |
Lifespan |
Source | |
enum |
Spawn Source |
area |
Spawn Area |
surface |
Distribution Map |
path |
Spawn Path |
vector |
Spawn Data |
enum |
Distribution |
float |
Distance |
float |
Uniform Period |
Movement | |
range |
Speed |
Direction | |
enum |
Direction Distribution |
rotRand |
Initial Direction |
bool |
Directed From Center |
rotRange |
Angle Range |
Wrap | |
toggle |
Wrap |
Rotation | |
rotRand |
Initial Rotation |
bool |
Rotate By Direction |
Animated | |
enum |
Rotation Type |
rotRand |
Rotational Speed |
rotRand |
Target Angle |
Snap | |
float |
Snap Rotation |
Scale | |
range2 |
Scale |
range |
Size |
Color | |
gradient |
Color On Spawn |
palette |
Color By Index |
gradient |
Color Over Lifetime |
range |
Alpha |
Sampler | |
surface |
Sample Surface |
Render | |
bool |
Render |
enum |
Render Type |
int |
Line Life |
bool |
Loop |
bool |
Round Position |
enum |
Blend Mode |
bool |
Sort Y |
Follow Path | |
bool |
Follow Path |
path |
Path |
bool |
Path Loop |
range2 |
Path Range |
range |
Range Shift |
curve |
Path Speed |
float |
Deviation |
Physics | |
bool |
Use Physics |
range |
Friction |
range |
Acceleration |
Gravity | |
range |
Gravity |
rot |
Gravity Direction |
Turning | |
range |
Turning |
bool |
Turn Both Directions |
float |
Turn Scale With Speed |
Ground | |
bool |
Collide Ground |
enum |
Ground Offset Type |
range |
Ground Offset |
Bounce | |
slider |
Bounce Amount |
slider |
Bounce Friction |
Wiggles | |
bool |
Use Wiggles |
vec2 |
Direction |
vec2 |
Position |
vec2 |
Rotation |
vec2 |
Scale |
Unused | |
int |
Pre-Render |
int |
Boundary Data |
surface |
Atlas |
trigger |
Reset Seed |
Outputs | |
surface |
Surface Out |
particle |
Data |
Attributes | |
| Color Depth | |
| Interpolation | |

Simulate 2D particle effect.
Properties
| Sprite | |
| Surface Array | Method of procesing surface array: - Random: Set random surface for each particle. - Order: Set surface in order of the particle spawning. - Animation: Use surface array as animation. Particle spawn with the first surface in the array then increase the index over lifespan. - Scale: Select array index based on particle scale. |
| Animation Speed | For animation type, define surface array animating speed (array index per frame of lifespan.) |
| Stretch Animation | For animation type, whether to stretch animation to particle lifespan. |
| On Animation End | For animation type, choose what to do when animation reach an end. |
| Spawn | |
| Spawn Type | Spawn Timing - Stream: Spawn particles constantly. - Burst: Spawn particles once in burst. - Trigger: Spawn particles using manual trigger. |
| Spawn Delay | For Stream type, frames delay between each particle spawn. |
| Spawn Frame | For Burst type, frame index to spawn. |
| Burst Duration | For Burst type, amount of frames to spawn. |
| Spawn Amount | Amount of particles to spawn per frame. |
| Spawn > Lifespan | |
| Lifespan | Particle lifespan. |
| Spawn > Source | |
| Spawn Source | Type of particle spawn source. - Area Inside: Spawn inside an area. - Area Border: Spawn around area border. - Map: Spawn based on greyscale surface. - Path: Spawn along a path. - Direct Data: Spawn from array of vec2 points. |
| Distribution | For area, path source, particle spawning pattern. |
| Uniform Period | For uniform distribution, define distribution amount (e.g. if set to 4, particle will spawn at 4 fixed points in the source.) If set to zero, will use Spawn Amount. |
| Movement | |
| Speed | Particle initial speed. If use speed over lifespan curve it may causes conflict with physics. |
| Movement > Direction | |
| Initial Direction | Initial direction range. |
| Directed From Center | Make particle move away from the spawn center. |
| Angle Range | For Directed From Center, define range of angle around the center. |
| Movement > Wrap | |
| Wrap | Loop particle from one side of the surface to another. |
| Rotation | |
| Rotate By Direction | Make the particle rotates to follow its movement. This value will be offset by Initial Rotation. |
| Rotation > Animated | |
| Rotation Type | Type of rotation animation. - Speed: Add rotation angle per frame. - Fix Relative: Lerp to angle ralative to orignal angle over lifespan. - Fix target: Lerp to fix angle over lifespan. |
| Snap | Snap rotation to fixed angle. |
| Scale | |
| Scale | Define non-uniform particle scale. |
| Size | Uniform particle scale. |
| Color | |
| Color On Spawn | Initial particle color. |
| Color By Index | Particle color per spawn index. |
| Color Over Lifetime | Apply color over lifespan. |
| Sample Surface | Sample color from another surface on spawn. |
| Render | |
| Render Type | Rendering type, surface or line. |
| Line Life | Line lifespan in frames. |
| Loop | Render the whole simulation before the first frame to create looping animation. Will have major impact to performance. |
| Round Position | Round position to the closest integer value to avoid anti-aliasing. |
| Sort Y | Sort particle by Y position before rendering. |
| Follow Path | |
| Follow Path | Make particle follow path movement. This will added to particle initial position so set particle to spawn at [0,0] to have it follow the path exactly. |
| Path Range | Range of path to follow. |
| Range Shift | Randomly shift path range per particle. |
| Path Speed | Path following curve. |
| Deviation | How much of the initial position to apply to the final position (Final position = Path position + Simulation position * Deviation). |
| Physics | |
| Friction | Decrease speed by a fraction of the current speed per frame. |
| Acceleration | Increase, decrease speed by a fixed amount per frame. |
| Physics > Gravity | |
| Gravity | Gravity strength |
| Physics > Turning | |
| Turning | Apply constant rotation change to turn the particle. |
| Turn Both Directions | Apply randomized 1 or -1 multiplier to the turning speed. |
| Turn Scale With Speed | Scale turning speed with the current speed. |
| Ground | |
| Collide Ground | Collide particle with a horizontal ground. |
| Ground Offset Type | Methods for setting ground Y position. Absolute for fixed ground for every particle, Relative will set ground relative to particle spawn position. |
| Ground > Bounce | |
| Bounce Amount | Bounce particle when hit the ground. |
| Bounce Friction | Reduce horizontal velocity when hitting the ground. |
| Wiggles | |
| Direction | Randomly change particle direction. |
| Position | Randomly apply direct movement to the particle. |
| Rotation | Randomly rotate particle. |
| Scale | Randomly scale particle. |
Commit History
| 1.21.8.009 |
|
|---|---|
| 1.21.6.004 |
|
| 1.21.5.006 |
|
| 1.21.4.004 |
|
| 1.21.3.008 |
|
Related Links
- Base Code: /scripts/node_particle/node_particle.gml
- Shader [sh_sample]: /shaders/sh_sample/sh_sample.fsh